package com.investmenttechnologyservices.model;

import javax.persistence.Id;

public class TradeSubAllocation {
	@Id Long key; //technical
	
	// Key to record is tradeId + stageType + version
	Long tradeId; 
 	StageType stageType;
	Long version;
	/**
	 * SubAllocationType
	 * 
	 * THis is a user defined list (pre-loaded values include Strategy, Custoday)
	 */
	SubAllocationType subAllocationType;
	/**
	 * SubAllocationId
	 * 
	 * This is the Id of the type. 
	 */
	String subAllocationId;
	Double subAllocatedQuantity;	
	
	public TradeSubAllocation() {
		
	}
	
	public TradeSubAllocation(Long tradeId, StageType stageType, Long version, 
			SubAllocationType subAllocationType, String subAllocationId,
		Double subAllocatedQuantity) {
		this.tradeId = tradeId;
		this.stageType = stageType;
		this.version = version;
		this.subAllocationType = subAllocationType;
		this.subAllocationId = subAllocationId;
		this.subAllocatedQuantity = subAllocatedQuantity;
	}
	
	public Long getKey() {return key;}
	
	public void setTradeId(Long tradeId) {this.tradeId = tradeId;}
	public Long getTradeId() {return tradeId;}
	
	public void setStageType(StageType stageType) {this.stageType = stageType;}
	public StageType getStageType() {return stageType;}
	
	public void setVersion(Long version) {this.version = version;}
	public Long getVersion() {return version;}
	
	public void setSubAllocationType(SubAllocationType subAllocationType) {
		this.subAllocationType = subAllocationType;
	}
	public SubAllocationType getSubAllocationType() {return subAllocationType;}
	
	public void setSubAllocationId(String subAllocationId) {this.subAllocationId=subAllocationId;}
	public String getSubAllocationId() {return subAllocationId;}
	
}
